package com.yaxin.outsourcing.domain.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yaxin.common.annotation.ExcelDictFormat;
import com.yaxin.common.convert.ExcelDictConvert;
import com.yaxin.outsourcing.enums.PersonStatus;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;

@Data
public class OutSourcingPersonExportVO {

    private static final long serialVersionUID=1L;

    /*
     * 人员ID
     */
    @ExcelProperty(value = "人员ID")
    private Long perId;

    /*
     * 申请单号
     */
    @ExcelProperty(value = "申请单号")
    private Long appNo;

    /*
     * 姓名
     */
    @ExcelProperty(value = "姓名")
    private String userName;

    /*
     * 身份证号
     */
    @ExcelProperty(value = "身份证号")
    private String idCard;

    /*
     * 联系方式
     */
    @ExcelProperty(value = "联系方式")
    private String userPhone;

    /*
     * 公司名称
     */
    @ExcelProperty(value = "公司名称")
    private String companyName;

    /*
     * 工作区域
     */
    @ExcelProperty(value = "工作区域")
    private String workArea;

    /*
     * 状态(1-正常,0-失效)
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "FAILURE=失效,NORMAL=正常")
    private PersonStatus status;

    /*
     * IC卡编号
     */
    @ExcelProperty(value = "IC卡编号")
    private String icNo;

    /*
     * 入厂日期
     */
    @ExcelProperty(value = "入厂日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime entryTime;

    /*
     * 结束日期
     */
    @ExcelProperty(value = "结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

}
